package com.briup.ch07;

/**
 * @Author briup-adam
 * @Date 2023/10/10 上午10:46
 * @Description
 **/

public class InnerClassDemo1 {
    public static void main(String[] args) {
        Outer1 outer1 = new Outer1();
        System.out.println(outer1.a);//10
        System.out.println(new Outer1().new Inner1().b);//20
    }
}
class Outer1{
    public int a=10;
    Outer1(){
        System.out.println(new Inner1().a);//1
    }
    // 成员内部类
    class Inner1{
        public int b=20;
        public int a=1;
        Inner1(){
            System.out.println(a);//1
            System.out.println(Outer1.this.a);//10
        }

    }
}
